/*
 * Copyright 2019 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

[data-i18n-prefix="DataTypeConstraintEnumerationItemView."] {
  border-bottom: 1px solid #DDD;
  padding: 6px 10px 0;

  &.highlighted {
    background-color: #E8F4FB;
  }

  [data-field="value-text"],
  [data-field="value-input-container"] {
    width: 400px;
    display: inline-block;
  }

  [data-field="value-text"] {
    cursor: pointer;
    white-space: nowrap;
    text-overflow: ellipsis;
    height: 20px;
  }

  [data-field="value-text"].none {
    opacity: .75;
    font-style: italic;
  }

  [data-field="remove-anchor"],
  [data-field="clear-field-anchor"],
  [data-field="save-anchor"] {
    text-align: center;
    position: absolute;
    right: 0;
    top: 0;
    font-size: 20px;
    width: 30px;
    height: 100%;

    .fa {
      position: absolute;
      width: 20px;
      height: 20px;
      top: ~"calc(50% - 10px)";
      left: ~"calc(50% - 10px)";
    }
  }

  [data-field="remove-anchor"],
  [data-field="clear-field-anchor"] {
    color: #777777;
  }

  [data-field="save-anchor"] {
    right: 30px;
  }

  .dropdown-kebab-container {
    float: right;
    margin-top: -1px;
  }

  .drag-grabber {
    color: #777777;
    position: absolute;
    cursor: pointer;
    height: 100%;
    width: 10px;
    left: 5px;
    top: 0;

    .fa {
      position: absolute;
      top: ~"calc(50% - 5px)";

      & + .fa {
        left: 5px;
      }
    }
  }

  .drag-grabber:hover {
    cursor: grab;
  }

  .drag-grabber:active {
    cursor: grabbing;
  }
}

.kie-data-type-constraints-enumeration {
  &.dropdown-menu {
    min-width: 100px;
    padding: 5px;

    .divider {
      background-color: #DDD;
    }
  }
}
